<link href="js/swfupload/css/default.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	.swfupload {
		position: absolute;
		z-index: 1;
	}
</style>
<script type="text/javascript" src="js/swfupload/swfupload.js"></script>
<script type="text/javascript" src="js/swfupload/js/swfupload.swfobject.js"></script>
<script type="text/javascript" src="js/swfupload/js/swfupload.queue.js"></script>
<script type="text/javascript" src="js/swfupload/js/fileprogress.js"></script>
<script type="text/javascript" src="js/swfupload/js/handlers.js"></script>
<script type="text/javascript">
var swfu;

SWFUpload.onload = function () {
	var settings = {
		flash_url : "js/swfupload/swfupload.swf",
		upload_url: "cpupload.php", post_params : {
					"phimid" : "<?=$ipid;?>",
					"fileoner" : "<?=replace($tenphim);?>",
		},
		file_size_limit : "100 MB",
		file_types : "*.jpg;*.gif;*.png",
		file_types_description : "Images Files",
		file_upload_limit : 100,
		file_queue_limit : 0,
		custom_settings : {
			progressTarget : "fsUploadProgress",
			cancelButtonId : "btnCancel"
		},
		debug: false,

		// Button Settings
		button_placeholder_id : "spanButtonPlaceholder",
		button_width: 61,
		button_height: 22,
		button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
		button_cursor: SWFUpload.CURSOR.HAND,

		// The event handler functions are defined in handlers.js
		swfupload_loaded_handler : swfUploadLoaded,
		file_queued_handler : fileQueued,
		file_queue_error_handler : fileQueueError,
		file_dialog_complete_handler : fileDialogComplete,
		upload_start_handler : uploadStart,
		upload_progress_handler : uploadProgress,
		upload_error_handler : uploadError,
		upload_success_handler : uploadSuccess,
		upload_complete_handler : uploadComplete,
		queue_complete_handler : queueComplete,	// Queue plugin event
		
		// SWFObject settings
		minimum_flash_version : "9.0.28",
		swfupload_pre_load_handler : swfUploadPreLoad,
		swfupload_load_failed_handler : swfUploadLoadFailed
	};

	swfu = new SWFUpload(settings);
}
</script>
	<div class="content_block">
		<div class="form_tbl" id="slides">	

					<form name="themeform" enctype="multipart/form-data" method="post">
                    <!-- thong tin bo phim -->                 
                    <div id="addfilm_new">
                        <h1 style="padding: 16px 0px 16px 0px;">Sửa thông tin phim</h1>
                        <div class="form_item">
                                <label>Tên bộ phim:</label>
                                <input class="flat" size="30" name="tenphim" value="<?=$tenphim;?>"  maxlength="250">
                        </div>
                        <div class="form_item">
                                <label>Tên tiếng anh:</label>
                                <input class="flat" size="30" name="tentienganh" value="<?=$tentienganh;?>"  maxlength="250">
                        </div>
                        <div class="form_item">
								<?php if(UPLOAD_IMAGES == 1) { ?>
                                <label>Ảnh:</label>
                                <div style="float:left;">
                                <input style="height:18px; width: 320px;" value="<?=$phimimg;?>" id="phimimg_name" type="text" readonly="readonly" /></div>
                                <div style="float:left;" class="browse"><input name="phimimg" id="phimimg" type="file"></div>
                                <div style="clear:both;"></div>
                                <input style="margin-top: 8px;" type="hidden" value="<?=$phimimg;?>" name="phim_img" />
								<? } else { ?>
								<label>Liên kết ảnh:</label>
                                <input class="flat" size="30" name="phimimg" value="<?=$phimimg;?>"  maxlength="250">
								<input style="margin-top: 8px;" type="hidden" value="<?=$phimimg;?>" name="phim_img" />
								<? } ?>
                        </div>
						<script>
                        $('#phimimg').change(function(){
                            $('#phimimg_name').val($(this).val());
                        });
                        </script>
                        <div class="form_item">
                                <label>Đạo diễn:</label>
                                <input class="flat" size="30" name="daodien" value="<?=$daodien;?>" maxlength="250">
                        </div>
                        <div class="form_item">
                                <label>Diễn viên:</label>
                                <input class="flat" size="30" name="dienvien" value="<?=$dienvien;?>" maxlength="250">
                        </div>
                        <div class="form_item">
                                <label>Nhà sản xuất:</label>
                                <input class="flat" size="30" name="nhasanxuat" value="<?=$nhasanxuat;?>" maxlength="250">
                        </div>
                        <div class="form_item">
                                <label>Thời lượng:</label>
                                <input class="flat" size="30" name="thoiluong" value="<?=$thoiluong;?>" maxlength="250">
                        </div>
                        <div class="form_item">
                                <label>Năm sản xuất:</label>
                                <input class="flat" size="30" name="namsanxuat" value="<?=$namsanxuat;?>" maxlength="250">
                        </div>
                        <div class="form_item">
                                <label>Chất lượng:</label>
                                <input class="flat" size="30" name="chatluong" value="<?=$chatluong;?>" maxlength="250">
                        </div>
                        <div class="form_item">
                                <label>Trainer Url:</label>
                                <input class="flat" size="30" name="trailer" value="<?=$trailer;?>" maxlength="250">
                        </div>
                        <div class="form_item">
                                <label>Quốc Gia:</label>
                                <?=ipod_country($quocgia);?>
                        </div>
                        <div class="form_item">
                                <label>Phân loại phim:</label>
                                <?=ipod_film_pl($phimbo);?>
                        </div>
                        <table cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td class="form_item" width="180">Thể loại:</td>
                            <td class="form_item"><?=ipos_category($theloai);?></td>
                        </tr>
                        </table>
                        <div class="form_item">
                                <label>Giới thiệu phim:</label>
                                <textarea name="phimtxt" style="width:630px; height: 130px;"><?=$phimtxt;?></textarea>
                        </div>
                        <div class="form_item">
                                <label>Từ khóa tìm kiếm:</label>
                                <textarea name="phimtag" style="width:630px; height: 70px;"><?=$phimtag;?></textarea>
                        </div>

                        <div class="form_item">
		<div id="divSWFUploadUI">
			<div class="fieldset flash" id="fsUploadProgress">
			<span class="legend">Hình ảnh trong phim</span>
			</div>
			<p id="divStatus">0 Ảnh đã tải lên</p>
			<p>
				<span id="spanButtonPlaceholder"></span>
				<input id="btnUpload" type="button" value="Chọn ảnh" style="width: 61px; height: 22px; font-size: 8pt;" />
				<input id="btnCancel" type="button" value="Dừng" disabled="disabled" style=" width: 60px;margin-left: 2px; height: 22px; font-size: 8pt;" />
			</p>
			<br style="clear: both;" />
		</div>
		<noscript style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px;">
			We're sorry.  SWFUpload could not load.  You must have JavaScript enabled to enjoy SWFUpload.
		</noscript>
		<div id="divLoadingContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
			SWFUpload is loading. Please wait a moment...
		</div>
		<div id="divLongLoading" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
			SWFUpload is taking a long time to load or the load has failed.  Please make sure that the Flash Plugin is enabled and that a working version of the Adobe Flash Player is installed.
		</div>
		<div id="divAlternateContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
			We're sorry.  SWFUpload could not load.  You may need to install or upgrade Flash Player.
			Visit the <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Adobe website</a> to get the Flash Player.
		</div>
        <!-- end swf upload -->
                        </div>

					<div class="form_item">
							<span onmouseout="this.className='mb_btn1'" onmouseover="this.className='mb_btn1_hover'" class="mb_btn1">
								<button value="Submit" name="submit" type="submit">Gửi đi</button>
							</span>
						</div>
					</form>
				</span>

			</div>
		</div>